home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / library / queue.lzh / queue / queue_inline.h < prev    next >
C/C++ Source or Header  |  1995-10-12  |  3KB  |  124 lines

  1. #ifndef _INLINE_QUEUE_PROTOTYPES_H
  2. #define _INLINE_QUEUE_PROTOTYPES_H
  3.  
  4. #include <sys/cdefs.h>
  5. #include <inline/stubs.h>
  6.  
  7. __BEGIN_DECLS
  8.  
  9. #ifndef BASE_EXT_DECL
  10. #define BASE_EXT_DECL
  11. #define BASE_EXT_DECL0 extern struct Library *QueueBase;
  12. #endif
  13. #ifndef BASE_PAR_DECL
  14. #define BASE_PAR_DECL
  15. #define BASE_PAR_DECL0 void
  16. #endif
  17. #ifndef BASE_NAME
  18. #define BASE_NAME QueueBase
  19. #endif
  20.  
  21. BASE_EXT_DECL0
  22.  
  23. extern  void 
  24. QAddMsg (BASE_PAR_DECL QHandle qh,QMessage *msg)
  25. {
  26.   BASE_EXT_DECL
  27.   register struct Library *a6 __asm("a6") = BASE_NAME;
  28.   register QHandle a0 __asm("a0") = qh;
  29.   register QMessage *a1 __asm("a1") = msg;
  30.   __asm __volatile ("jsr a6@(-0x2a)"
  31.   : /* no output */
  32.   : "r" (a6), "r" (a0), "r" (a1)
  33.   : "a0","a1","d0","d1", "memory");
  34. }
  35. extern  ULONG 
  36. QClose (BASE_PAR_DECL QHandle qh)
  37. {
  38.   BASE_EXT_DECL
  39.   register ULONG  _res  __asm("d0");
  40.   register struct Library *a6 __asm("a6") = BASE_NAME;
  41.   register QHandle a0 __asm("a0") = qh;
  42.   __asm __volatile ("jsr a6@(-0x24)"
  43.   : "=r" (_res)
  44.   : "r" (a6), "r" (a0)
  45.   : "a0","a1","d0","d1", "memory");
  46.   return _res;
  47. }
  48. extern  ULONG 
  49. QFlush (BASE_PAR_DECL QHandle qh)
  50. {
  51.   BASE_EXT_DECL
  52.   register ULONG  _res  __asm("d0");
  53.   register struct Library *a6 __asm("a6") = BASE_NAME;
  54.   register QHandle a0 __asm("a0") = qh;
  55.   __asm __volatile ("jsr a6@(-0x42)"
  56.   : "=r" (_res)
  57.   : "r" (a6), "r" (a0)
  58.   : "a0","a1","d0","d1", "memory");
  59.   return _res;
  60. }
  61. extern  QMessage *
  62. QGetMsg (BASE_PAR_DECL QHandle qh)
  63. {
  64.   BASE_EXT_DECL
  65.   register QMessage * _res  __asm("d0");
  66.   register struct Library *a6 __asm("a6") = BASE_NAME;
  67.   register QHandle a0 __asm("a0") = qh;
  68.   __asm __volatile ("jsr a6@(-0x36)"
  69.   : "=r" (_res)
  70.   : "r" (a6), "r" (a0)
  71.   : "a0","a1","d0","d1", "memory");
  72.   return _res;
  73. }
  74. extern  QHandle 
  75. QOpen (BASE_PAR_DECL STRPTR name,ULONG mode,ULONG sigbit)
  76. {
  77.   BASE_EXT_DECL
  78.   register QHandle  _res  __asm("d0");
  79.   register struct Library *a6 __asm("a6") = BASE_NAME;
  80.   register STRPTR a0 __asm("a0") = name;
  81.   register ULONG d0 __asm("d0") = mode;
  82.   register ULONG d1 __asm("d1") = sigbit;
  83.   __asm __volatile ("jsr a6@(-0x1e)"
  84.   : "=r" (_res)
  85.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  86.   : "a0","a1","d0","d1", "memory");
  87.   return _res;
  88. }
  89. extern  void 
  90. QRemMsg (BASE_PAR_DECL QHandle qh,QMessage *msg)
  91. {
  92.   BASE_EXT_DECL
  93.   register struct Library *a6 __asm("a6") = BASE_NAME;
  94.   register QHandle a0 __asm("a0") = qh;
  95.   register QMessage *a1 __asm("a1") = msg;
  96.   __asm __volatile ("jsr a6@(-0x30)"
  97.   : /* no output */
  98.   : "r" (a6), "r" (a0), "r" (a1)
  99.   : "a0","a1","d0","d1", "memory");
  100. }
  101. extern  ULONG 
  102. QReplyMsg (BASE_PAR_DECL QHandle qh)
  103. {
  104.   BASE_EXT_DECL
  105.   register ULONG  _res  __asm("d0");
  106.   register struct Library *a6 __asm("a6") = BASE_NAME;
  107.   register QHandle a0 __asm("a0") = qh;
  108.   __asm __volatile ("jsr a6@(-0x3c)"
  109.   : "=r" (_res)
  110.   : "r" (a6), "r" (a0)
  111.   : "a0","a1","d0","d1", "memory");
  112.   return _res;
  113. }
  114.  
  115. #undef BASE_EXT_DECL
  116. #undef BASE_EXT_DECL0
  117. #undef BASE_PAR_DECL
  118. #undef BASE_PAR_DECL0
  119. #undef BASE_NAME
  120.  
  121. __END_DECLS
  122.  
  123. #endif /* _INLINE_QUEUE_PROTOTYPES_H */
  124.